package com.data4.supplier.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.data4.feignapi.dto.CategoryDTO;
import com.data4.feignapi.dto.CategoryUpdateDTO;
import com.data4.feignapi.dto.Result;
import com.data4.feignapi.entity.Category;
import com.data4.feignapi.vo.CategoryAndStandardsVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author Forever
 * @since 2024-12-11
 */
public interface CategoryService extends IService<Category> {

    @Transactional
    Result addCategory(CategoryDTO categoryAndStandard,Integer supplierId);

    @Transactional
    Result updateCategory(CategoryUpdateDTO category, Integer categoryId, Integer supplierId);

    @Transactional
    Result deleteCategory(List<Integer> categoryIdList, Integer supplierId);

    @Transactional
    Result getCategory(Integer current, Integer num, Integer supplierId);
    @Transactional
    Result getCategoryByNameLike(String parentName, String childName,
                                 Integer current, Integer num, Integer supplierId);

    CategoryAndStandardsVO getCategoryAndStandardsVO(Integer categoryId, Integer supplierId);
}
